package com.smh.a17exerciseDemo4;

import java.util.ArrayList;
import java.util.Random;

public class Test {
    public static void main(String[] args) {

        double money = 100;
        Random random = new Random();

        ArrayList<Double> list = new ArrayList<>();
        for (int i = 0; i < 2; i++) {
            double temp = random.nextDouble(money);
            list.add(temp);
            money -= temp;
        }
        list.add(money);

        MyThread t = new MyThread(list);
        MyThread t2 = new MyThread(list);
        MyThread t3 = new MyThread(list);
        MyThread t4 = new MyThread(list);
        MyThread t5 = new MyThread(list);
        t.start();
        t2.start();
        t3.start();
        t4.start();
        t5.start();


    }
}
